<?php
/**
 * Created by Command.
 * User: Vito
 */

namespace app\admin\curd\building;

use app\model\Housing;
use app\common\curd\Save;

class BuildingSave extends Save
{
    //验证器
    protected $validate = [];
    //追加数据
    protected $appendParams = [];
    //允许新增的数据字段
    protected $field = [];
    protected function saveMiddleware($next, $params)
    {

        $where['id'] = $params['housing_id'];
        $name = Housing::getHousing($where);
        $params['name'] = $name;
        // halt($params);
        return $next( $params);
    }   
}